import { createApp } from 'vue'
import App from './App.vue'
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import './style.css'
import './demos/ipc'
// If you want use Node.js, the`nodeIntegration` needs to be enabled in the Main process.
// import './demos/node'

declare const window: any;
declare const Date: any;

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

app.use(router).mount('#app').$nextTick(() => {
    postMessage({ payload: 'removeLoading' }, '*')
})

// const res = await window.ipcRenderer.shenfencard()
// console.log('res',res);











